perm filename SLDEC.ACH[UP,DOC] blob
sn#500361 filedate 1980-03-02 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00051 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00007 00002
C00009 00003 STANDARD LISP ON DECSYSTEM 10 AND 20
C00013 00004 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 1
C00017 00005 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 2
C00021 00006 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 3
C00026 00007 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 4
C00030 00008 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 5
C00034 00009 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 6
C00040 00010 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 7
C00043 00011 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 8
C00048 00012 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 9
C00050 00013 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 10
C00054 00014 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 11
C00057 00015 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 12
C00061 00016 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 13
C00065 00017 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 14
C00069 00018 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 15
C00072 00019 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 16
C00076 00020 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 17
C00079 00021 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 18
C00082 00022 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 19
C00085 00023 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 20
C00089 00024 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 21
C00093 00025 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 22
C00096 00026 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 23
C00100 00027 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 24
C00104 00028 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 25
C00108 00029 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 26
C00112 00030 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 27
C00113 00031 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 28
C00116 00032 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 29
C00119 00033 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 30
C00123 00034 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 31
C00125 00035 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 32
C00130 00036 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 33
C00134 00037 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 34
C00138 00038 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 35
C00142 00039 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 36
C00145 00040 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 37
C00149 00041 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 38
C00152 00042 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 39
C00155 00043 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 40
C00159 00044 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 41
C00161 00045 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 42
C00162 00046 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 43
C00166 00047 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 44
C00170 00048 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 45
C00174 00049 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 46
C00178 00050 STANDARD LISP ON DECSYSTEM 10 AND 20 Page 47
C00181 00051
C00182 ENDMK
C⊗;
University of Utah Symbolic Computation Group July 1978
Technical Report No. TR-2 First Revision - March 1979
MANUAL
for
STANDARD LISP
on
DECSYSTEM 10 and 20
by
Inge B. Frick
University of Utah
Salt Lake City, UT 84112
ABSTRACT
An implementation of Standard Lisp on the DECsystem
10 and 20 is presented. The implementation is based
on Stanford Lisp 1.6.
Work supported in part by the National Science Foundation under Grant
No. MCS 76-15035.
STANDARD LISP ON DECSYSTEM 10 AND 20
Table of Contents
1. PRELIMINARIES ......................................... 1
1.1 Document Conventions ................................. 1
1.2 Special Terminal Control Characters .................. 2
1.3 Data Types ........................................... 2
1.4 Property Lists ....................................... 5
1.5 Value Cells .......................................... 6
1.6 Function Cells ....................................... 6
1.7 The OBLIST ........................................... 7
2. EXTENSIONS AND DIFFERENCES FROM STANDARD LISP ......... 8
2.1 Boolean Arguments And Predicates ..................... 8
2.2 Error Handling ....................................... 8
2.3 I/O .................................................. 11
2.4 The Interpreter ...................................... 15
2.5 The Fap Loader ....................................... 18
2.6 Logical Routines And LAP Support ..................... 18
2.7 The Alternative Scanner SCAN ......................... 20
2.7.1 Scanner Functions .................................. 20
2.8 Other Functions ...................................... 22
2.9 Memory Allocation .................................... 24
2.9.1 Storage Allocation Areas ........................... 24
2.9.2 Allocation ......................................... 25
2.9.3 Reallocating Space ................................. 25
2.10 The Garbage Collector ............................... 26
3. GLOBAL (FLUID) SYSTEM VARIABLES ....................... 28
4. ERROR MESSAGES AND WARNINGS ........................... 32
4.1 Error messages not starting with a bad part .......... 32
4.2 Error messages starting with a bad part .............. 36
4.3 Warnings and diagnostic messages ..................... 38
5.0 DIFFERENCES BETWEEN LISP 1.6 AND STANDARD LISP ....... 40
6.0 REFERENCES ........................................... 42
INDEX .................................................... 43
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 1
1.0 PRELIMINARIES
This manual describes Standard Lisp implemented on the DECsystem 10
and 20. The code for Stanford Lisp 1.6 has been changed in order to
make it conform to the specifications in the Standard Lisp report
[1]. For this reason the parts of the STANFORD LISP 1.6 MANUAL [2],
that still are relevant have been included here, so that [2] is no
longer necessary. This Standard Lisp system contains the system
described in [1] as a subset. This manual is therefore intended as a
complement to [1] and features fully discussed in [1] are not
described here.
1.1 Document Conventions
In the description of the primitive data structures, the following
pictorial notation is used:
---------
| | | ->
---------
|
v
represents a 36-bit word in FREE STORAGE (a Lisp cell) with 2
18-bit pointers. The CAR part is to the left and the CDR part to
the right.
-----------
| ABC | | ->
-----------
is similar to the previous, but the ABC stands for a pointer to
the identifier ABC. I.e. CAR of the structure is ABC.
---------
| |
---------
represents a 36-bit word in full word space.
Character conventions: The characters altmode, carriage return,
linefeed, formfeed, horizontal tab, space and rubout (delete) will
sometimes be represented as <alt>, <cr>, <lf>, <ff>, <tab>, <sp> and
<del>. Control characters are usually written as ↑ followed by an
ordinary character, e.g. control-A is written ↑A.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 2
1.2 Special Terminal Control Characters
The time-sharing system treats many control characters in special
ways. For a complete discussion of control characters see the
appropriate DECsystem 10 or 20 manuals. Briefly the following
special control characters are used in Lisp.
Character Meaning
↑C Exit Lisp and talk to the monitor.
↑G (Bell) Stop the current Lisp process and go to the top
level of Lisp. Only effective when Lisp is asking
for input.
↑O Suppress console printout until an input is
requested.
↑U (↑X in Tenex) Delete the entire input line now
being typed. This is only effective when *DDTIN is
NIL.
<del> (↑A in Tenex) Delete the last character typed if
*DDTIN is NIL. If *DDTIN is true, then <del> (in
Tenex too) will delete the entire S-expression
being read.
↑R Retypes the current input line. No special meaning
in Tenex.
1.3 Data Types
This section describes the implementation of the primitive data types
discussed in [1] 2.1. It should be noted that some of the details
given in this section are temporary and may be changed. These
changes will be transparent to the user if he does not access parts
of an atom by using CAR, CDR, RPLACA or RPLACD etc..
All atoms (except INUMs, see below) start with one word that contains
a type tag in the left half and a pointer to the rest of the atom in
the right half.
Integer - There are three representations for integers depending on
the numerical magnitude of the integer: INUM, FIXNUM and BIGNUM.
Their ranges are as follows:
INUM abs(n) < K K is usually 2↑16-8
FIXNUM K =< abs(n) < 2↑35
BIGNUM 2↑35 =< abs(n)
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 3
INUMs are small integers represented by pointers outside of the
normal LISP addressing space. INUMs are addresses in the range
2↑18-2K-J+1 to 2↑18-1-J, where J at present is 8. The
representation for zero is INUM0 = 2↑18-K-J.
FIXNUMs are represented by list structure of the following form:
-------------- ---------
| fixtag | | -> | value |
-------------- ---------
where value is the 2's complement representation of the fixed
point number and fixtag at present is -6.
BIGNUMs are represented by list structure of the following forms:
Positive BIGNUMs:
-------------- --------- -----------
| postag | | -> | | | -> ... -> | | NIL |
-------------- --------- -----------
| |
v v
--------- -----------
| N0 | | Nn |
--------- -----------
Negative BIGNUMs:
-------------- --------- -----------
| negtag | | -> | | | -> ... -> | | NIL |
-------------- --------- -----------
| |
v v
--------- -----------
| N0 | | Nn |
--------- -----------
where N0 ... Nn are positive 36 bit integers ordered from
least to most significant and at present postag is -7 and
negtag is -8. The value of a BIGNUM is:
sign * (N0 + N1*2↑35 + N2*(2↑35)↑2 +...+Nn*(2↑35)↑n)
The syntax for integers is as described in [1] 2.1, with the
exception that an integer followed by a ".", is read as an integer
with decimal radix instead of a floating point number with no
exponent and no fractional part. With this exception the radix
when reading a number is specified by the value of the variable
IBASE. The radix when printing an integer is specified by the
value of the variable BASE. When the value of BASE is 10
(decimal), then integers will print with a following ".", unless
the variable *NOPOINT is not NIL.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 4
Floating - Floating point numbers are represented by list structure
of the following form:
-------------- ---------
| flotag | | -> | value |
-------------- ---------
where value is in DECsystem 10 2's complement representation and
flotag at present is -5.
The radix for a floating point number is always decimal. A
floating point number must be in the (approximate) range:
10↑-38 < abs(x) < 10↑+38 or x = 0
A floating point number has approximately eight significant digits
of accuracy.
String - Strings are represented by a header word followed by a list
of full words, each containing five ASCII characters.
Example: The string "Time of day" is represented as follows:
-------------- --------- --------- -----------
| strtag | | -> | | | -> | | | -> | | NIL |
-------------- --------- --------- -----------
| | |
v v v
--------- --------- ---------
| Time | | of da | | y↑↑↑↑ |
--------- --------- ---------
where ↑ means null or ASCII 0, and strtag at present is -4. The
number of characters in a string is limited only by available full
word space.
vector - A vector is internally represented as a dotted pair of the
following form:
--------------
| vectag | | -> vector in BPS
--------------
where vectag at present is -3. The size of a vector is only
limited by the available BPS.
code-pointer - A code pointer is represented as a dotted pair of the
following form:
--------------
| codtag | | -> binary code in BPS
--------------
where codtag at present is -2.
id - An identifier is represented by a dotted pair of the following
form:
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 5
-------------
| idtag | | -> property list
-------------
where idtag at present is -1.
The syntax for identifiers is similar to that specified in [1] 2.1
with the following differences:
<lead-character> ::= <special-character>|<letter>
<regular-character> ::= <lead-character>|<digit>|+|-|'
<letter> ::= <alphabetic>|<extra-letter>
<delimiter> ::= (|)|<|>|[|]|<alt>|<rub>
<ignored> ::= <tab>|<lf>|<vtab>|<ff>|<cr>|<space>|,
<special-control> ::= <null>|<control-Z>|'|+|-|.|E|"|!
<extra-letter> ::= <any character not a digit, ignored,
delimiter or special-control>
The number of characters in an id is limited only by available
full word space.
1.4 Property Lists
The property list of an identifier is a list of flags and (property
name, property value) pairs associated with that identifier. All
identifiers have a PNAME (print name) property with a property value
that is a list of full words with the same format as for a string.
Example: The identifier A is represented by:
---------- -----------
| -1 | | -> | | NIL |
---------- -----------
|
v
------------- -----------
| PNAME | | -> | | NIL |
------------- -----------
|
v
---------
| A↑↑↑↑ |
---------
Example: After the commands (FLAG '(A) 'NFLG) and (PUT 'A 'TYP 'K)
then the identifier A is represented by:
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 6
---------- --------- ------------ -----------
| -1 | | -> | | | -> | NFLG | | -> | | NIL |
---------- --------- ------------ -----------
| |
v v
----------- ------------- -----------
| TYP | K | | PNAME | | -> | | NIL |
----------- ------------- -----------
|
v
---------
| A↑↑↑↑ |
---------
1.5 Value Cells
When a value is assigned to an identifier, the property name VALUE is
put on the identifier's property list with property value being a
pointer to a value cell. The CDR of the value cell holds the value
of the identifier. The address of a value cell remains constant for
that identifier unless REMPROPed, to enable compiled functions to
directly reference the values of global or fluid variables.
Example: After the command (SETQ A 'B), the identifier A is
represented by:
---------- --------- -----------
| -1 | | -> | | | -> | | NIL |
---------- --------- -----------
| |
v v
------------- ------------- -----------
| VALUE | | -- | PNAME | | -> | | NIL |
------------- | ------------- -----------
v |
--------- v
| 0 | B | ---------
--------- | A↑↑↑↑ |
---------
1.6 Function Cells
When an identifier is defined as a function by PUTD, DE, DF or DM,
the property name FUNCELL is put on the identifier's property list
with property value being a pointer to a function cell. The CAR of
the function cell is the function type, EXPR, FEXPR or MACRO. The
CDR of the function cell is a lambda expression or a code pointer.
It is possible that future versions of Standard Lisp will use the
value cell as a function cell. For that reason the function cell
should only be accessed by means of PUTD, GETD and REMD. The value
cell should only be accessed by SET, SETQ and EVAL. At present
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 7
(GETD x) is identical to (GET x 'FUNCELL).
Example: After the command (PUTD 'A 'type 'body), the identifier A
is represented by:
---------- --------- -----------
| -1 | | -> | | | -> | | NIL |
---------- --------- -----------
| |
v v
--------------- ------------- -----------
| FUNCELL | | -- | PNAME | | -> | | NIL |
--------------- | ------------- -----------
v |
--------------- v
| type | body | ---------
--------------- | A↑↑↑↑ |
---------
where "type" should be one of EXPR, FEXPR or MACRO and "body" should
be either a lambda expression or a code pointer.
1.7 The OBLIST
For the sake of searching efficiency, the OBLIST has two levels: the
first level contains sequentially stored "buckets" which are "hashed"
into as a function of the print name of the identifier. Each bucket
is a list of all distinct identifiers which have hashed into that
bucket. Thus, (CAR OBLIST) is the first bucket, and (CAAR OBLIST) is
the first identifier of the first bucket.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 8
2.0 EXTENSIONS AND DIFFERENCES FROM STANDARD LISP
The following functions are implemented exactly according to their
definitions in [1].
ABS, AND, APPEND, ATOM, CONS, DE, DEFLIST, DELETE, DF, DIFFERENCE,
DIVIDE, DM, EJECT, EQ, EQN, EQUAL, EXPAND, EXPT, FIX, FLAG, FLAGP,
FLOAT, FLUIDP, FUNCTION, GENSYM, GET, GETD, GETV, GLOBALP, GREATERP,
IDP, INTERN, LENGTH, LESSP, LIST, LPOSN, MAP, MAPC, MAPCAN, MAPCAR,
MAPCON, MAPLIST, MAX, MAX2, MEMBER, MEMQ, MIN, MINUS, MIN2, MKVECT,
NOT, NULL, OR, PAGELENGTH, PAIR, PLUS, PLUS2, POSN, PRINT, PRIN1,
PRIN2, PROG, PROGN, PUT, PUTV, QUOTE, QUOTIENT, REMAINDER, REMD,
REMFLAG, REMOB, REMPROP, REVERSE, SASSOC, SUBLIS, SUBST, TERPRI,
TIMES, TIMES2, UPBV.
The rest of this section describes new functions and functions that
differ from those in Standard Lisp.
2.1 Boolean Argument And Predicates
In this Standard Lisp implementation all booleans are actually
extra-boolean, i.e. functions that test boolean arguments test for
NIL or not NIL, they never test for T. The predicates BIGP,
CONSTANTP, DIGIT, FILEP, FIXP, FLOATP, INUMP, LITER, NUMBERP, PAIRP
and STRINGP return their argument instead of T when the tested
condition is true. VECTORP is identical to UPBV so that it returns
the upper limit if its argument is a vector. Currently CODEP returns
T if its argument is a code-pointer, but this might change in future
versions.
2.2 Error Handling
Error handling is somewhat different from that described in [1] 3.8.
Almost no Lisp system errors use the ERROR function. They are
handled internally in a similar way as a call to ERROR, the only
difference from a call to ERROR, is that the global variable EMSG* is
set to the offending expression (not the entire message) for messages
that include an offending part and to NIL for others.
After an error various types of backtraces will be printed depending
on the value of the variable *BAKGAG. If *BAKGAG is not NIL then a
backtrace is printed as a series of function calls, determined from
the regular pushdown list (stack), starting from the most recent
function call. If *BAKGAG is 0 or a negative integer then
S-expressions found on the stack (RPDL) will also be printed. If
*BAKGAG is +N or -N where N is an integer, then only the N last slots
on the stack will be considered (besides function calls and
S-expressions, the stack may contain other objects that are not
printed). The format for printing is:
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 9
printout meaning
fn1-fn2 Function 1 called function 2
fn1-EVALARGS The arguments to fn1 are being evaluated
before entering function 1.
fn1-ENTER Function 1 is entered.
?-fn1 Some internal LISP function called function
1.
NIL-fn1 Function 1 was called from a place other
than BPS or the Lisp system code. Something
is very wrong.
=sexp1 The S-expression 1 was on the stack.
Note: The BACKTRACE printout is often confused by compiled function
calls of the form (RETURN (FOO X)) which is compiled as
(JCALL (E FOO)) which will not show up in the BACKTRACE.
ERROR(ERVAL:any, MESSAGE:any)
This function is similar to that in [1] 3.8 but ERVAL is not
necessarily an integer and the backtrace is somewhat different.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 10
EXPR PROCEDURE ERROR(ERVAL,MESSAGE);
BEGIN SCALAR OCH;
EMSG!*:=MESSAGE;
IF NULL !*ERRMSG THEN GOTO ER
ELSE IF !*ERRMSG NEQ 0 THEN OCH:=WRS NIL;
IF NULL MESSAGE THEN GOTO BR;
TERPRI();
PRIN2 "***** ";
IF ATOM MESSAGE THEN <<PRIN2 MESSAGE; GOTO BR>>;
PRIN1 CAR MESSAGE;
PRINC '! ;
FOR EACH Y IN CDR MESSAGE DO <<PRIN2 Y; PRINC '! >>;
BR: IF NOT !*BAKGAG THEN GOTO NB
ELSE IF NOT FIXP !*BAKGAG THEN
{backtrace stack back to ERRORSET, printing function calls}
ELSE IF !*BAKGAG = 0 THEN
{backtrace stack back to ERRORSET,
printing function calls and arguments}
ELSE IF !*BAKGAG > 0 THEN
{backtrace !*BAKGAG last slots on stack,
printing function calls}
ELSE IF !*BAKGAG < 0 THEN
{backtrace -!*BAKGAG last slots on stack,
printing function calls and arguments}
TERPRI();
IF !*ERRMSG NEQ 0 THEN WRS OCH;
ER: {return ERVAL to a surrounding ERRORSET, unbinding
FLUID variables to the environment of the ERRORSET}
END;
ERRORSET(U:any, !*ERRMSG:any, !*BAKGAG:any):any
Type: EVAL, SPREAD
The difference from the definition in [1] 3.8 are that the second and
third variables are FLUID and of type any. The effect of these
variables can be seen in the preceding definition of ERROR. Note
that messages are printed on the standard output device or the
current output device, not on both.
If the GLOBAL variable !*RSET, of type boolean, is T then an ERROR
that is not surrounded by ERRORSET (except the top level of Lisp)
doesn't restore the environment of the top level. This makes it
possible to examine the variable bindings after an error. To restore
variable bindings to their top level values, type a bell ( ↑G ).
WARNING(MESSAGE:any):NIL
Type: EVAL, SPREAD
Prints a message in a format similar to error messages, but preceded
by 3 asterisks instead of 5. If !*ERRMSG is 0 then the message is
printed on the current output device, otherwise on the standard
output device. If !*MSG is NIL then no message is printed.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 11
EXPR PROCEDURE WARNING MESSAGE;
BEGIN SCALAR OCH;
IF NOT !*MSG THEN RETURN;
IF !*ERRMSG NEQ 0 THEN OCH:=WRS NIL;
TERPRI();
PRIN2 "*** ";
IF ATOM MESSAGE THEN <<PRIN2 MESSAGE; GOTO BR>>;
PRIN1 CAR MESSAGE;
PRINC '! ;
FOR EACH Y IN CDR MESSAGE DO <<PRIN2 Y; PRINC '! >>;
BR: TERPRI();
IF !*ERRMSG NEQ 0 THEN WRS OCH
END;
TIME():integer
Type: EVAL, SPREAD
TIME returns the CPU-time in milliseconds since the job was logged
in.
2.3 I/O
The I/O routines OPEN, CLOSE, RDS and WRS are similar to those in
[1]. A description of the system dependent parts and the (minor)
differences from [1] is given below.
OPEN(FILENAME-LIST:list, HOW:id):{integer, NIL}
OPEN associates the specified files (might be more than one) with one
of the 16 possible I/O channels in Lisp and returns as value the
number of the channel. This number is then used as argument to
CLOSE, RDS and WRS. The channels are numbered from 0 to 15. Channel
0 is the standard device (i.e. the TTY). It is always open for both
input and output and cannot be closed. Instead of 0, NIL can be used
and 0 is always converted to NIL by RDS and WRS before assigning
values to the globals INC* and OUTC*.
The syntax for FILENAME-LIST is as follows:
<filename-list> ::= (<file-spec>)
::= <id or string>
<file-spec> ::= <filename>
::= <file-spec> <filename>
::= <device-name> <file-spec>
<devicename> ::= <id or string>:
::= (<atom> <atom>)
::= DIR: <id or string>
<filename> ::= <id or string>
::= (<id or string> . <id or string>)
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 12
Semantics:
A filename-list that is an atom is the same as device DSK:, the atom
as filename and no extension.
A device-name is either an identifier or string ending with colon (:)
which is the name of an input or output device, or a list containing
a project-programmer number, or (not in TOPS-10 version) DIR:
followed by an identifier or string which is the name of a disk
directory. In the two last cases, the disk is implicitly specified.
I/O device names may not have more than three characters plus a
colon.
A filename is either an identifier or string which specifies a
filename with a blank extension, or a dotted pair of filename and
extension. In both cases the filename applies to the recently (to
the left) specified device-name. If no device-name is specified,
then DSK: is assumed. A filename may not be longer than six, and an
extension not longer than three characters.
HOW must be either INPUT, OUTPUT, INBIN or OUTBIN. The last two
keywords are used for binary I/O together with BINI and BINO. They
are mainly intended for the Fap loader.
CLOSE(CHANNELNAME:{integer, NIL}):{integer, NIL}
Type: EVAL, SPREAD
CLOSE closes the specified channel if it is open and returns its
argument as value. If CHANNELNAME is NIL or 0 then nothing happens
and NIL is returned.
RDS(CHANNELNAME:{integer, NIL}):{integer, NIL}
Type: EVAL, SPREAD
RDS selects the specified channel for input and returns as value the
channelname for the previously selected channel. When the end of the
selected channel is reached, the channel is automatically closed.
RDS sets the global variable INC* to the channel name for the
currently selected input channel.
WRS(CHANNELNAME:{integer, NIL}):{integer, NIL}
Type: EVAL, SPREAD
WRS selects the specified channel for output and returns as value the
channel name for the previously selected channel. WRS sets the
global variable OUTC* to the channel name for the currently selected
output channel.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 13
FILEP(FILENAME-LIST:list):{list, NIL}
Type: EVAL, SPREAD
FILENAME-LIST specifies a file in the same way as the first argument
to OPEN. If this is an existing file, then FILEP returns its
argument, otherwise NIL is returned.
SETSYS(SYSDEVICE:any):{integer, string}
Type: EVAL, SPREAD
SETSYS redefines the meaning of the device SYS: for OPEN. It is a
different function when running on a Tenex machine as compared with
running on a Tops-10 or Tops-20 machine.
On a Tenex machine, if SYSDEVICE is a non-negative integer, then SYS:
is set to mean the directory with directory number SYSDEVICE.
On a Tops machine, if SYSDEVICE is an identifier or string ending
with a colon ":", then SYSDEVICE is regarded as the name of an I/O
device and SYS: is set to mean that device. The device name may not
contain more than three characters, not counting the colon.
If SYSDEVICE is anything else, then nothing is changed. The value of
SETSYS is the directory number respectively the device name
associated with SYS: after the call to SETSYS.
SETPCHAR(PROMPT:{id or string}):id
Type: EVAL, SPREAD
SETPCHAR sets the Lisp prompter to the four first characters of
PROMPT and returns the previous prompter as a non interned id.
RDSLSH(U:boolean):boolean
Type: EVAL, SPREAD
RDSLSH affects how READ reads the characters "%", "@", "'", "/", "!",
"[", "]", "<" and ">". If U is NIL then READ is set to read Standard
Lisp, which means that "'" is quote, "%" is start of a comment ending
at (but not including) <lf>, "!" is escape (slashifier), "[" and "]"
surround a vector, "<" and ">" are super parentheses and "@" and "/"
are letters. If U is not NIL (e.g. T) then READ is set to read
LISP 1.6, which means that "@" is quote, "/" is escape, "[" and "]"
are super parentheses and "%", "<", ">", "'" and "!" are letters.
RDSLSH ends by calling SCANSET(NIL).
PGLINE():pair
Type: EVAL, SPREAD
PGLINE returns a dotted pair of current line and current page of
input. When the input is coming from the TTY, then the the answer is
always (1 . 1). When the input is coming from a file with SOS or
EDIT line numbers, then those line numbers are returned, otherwise
the line and page numbers are found by counting line and page feeds.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 14
READ():any
Type: EVAL, SPREAD
READ is the same as in [1] with the following differences. The
delimiters "<" and ">" operate as "super-parentheses". A right angle
bracket ">" will close all open left parentheses "(" up to matching
left angle bracket "<". If there is no matching left angle bracket,
it will close the entire S-expression.
When the input is comming from the terminal, then the character
altmode (or escape) will end the input line and close the
S-expression being read in the same way as a rigth angle bracket
without a matching left angle bracket.
SKIPTO(SKPCH:{id, string}):integer
Type: EVAL, SPREAD
SKIPTO skips characters from the selected input channel until a
character is found that matches the first character in the print name
of SKPCH. The ASCII code for that character is returned as value.
TYI():integer
Type: EVAL, SPREAD
TYI reads the next character from the selected input channel and
returns the ASCII code for that character.
UNREADCH(BCHR:id):id
Type: EVAL, SPREAD
UNREADCH puts the first character in BCHRs print name in an internal
backspace buffer and returns BCHR. This has as effect that when a
character is to be read from the selected input channel, then it is
instead taken from the backspace buffer and the buffer is cleared so
that subsequent characters are read from the selected input channel.
The buffer can only contain one character at a time. If a second
UNREADCH is executed before the buffer is cleared, then the buffer is
overwritten with the new BCHR, undoing the effect of the first
UNREADCH.
UNREADCH should only be used after TYI or READCH. The reason for
this is that functions that read atoms (READ and SCAN), uses the
backspace buffer to store the delimiter.
TYO(OCHR:integer):integer
TYO prints the character whose ASCII code is OCHR and returns OCHR.
PAGELENGTH and LINELENGTH
are similar to their definition in [1] but there is no upper limit to
their argument. The argument should be a positive number or NIL.
PAGELENGTH also accepts 0 as argument. Calls to PAGELENGTH or
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 15
LINELENGTH do only affect the presently selected output channel.
Each output channel that is OPENed, has initially LINELENGTH 112
(decimal) and PAGELENGTH 0 (i.e. no paging). The TTY channel
(channel NIL) has initially LINELENGTH 69 and PAGELENGTH 0.
The character ↑Z (Ascii 32) is used by PRIN1, PRIN2 and PRINT to
break an atom that is to long to fit in on the current line. All
reading routines (TYI, READCH and READ) will ignore everything
between a ↑Z and a <lf> including the end points.
Standard Lisp uses the character ↑← (Ascii 37) internaly as end of
line character. The reading routines will interpret a single <lf>, a
single <ff> or a <cr> followed by a <lf> or a <ff> as an end of line.
The printing routines print ↑← as <cr><lf>, except for TYO: (TYO 37)
(octal) prints ↑← (control ).
2.4 The Interpreter
The interpreter is an extension of that defined in [1]. The main
differences from [1] are:
The body of a lambda expression is an implied PROGN.
Environments can be passed around (FUNARG feature).
The LABEL construct is supported.
FEXPRs may have a second argument that is the environment.
The compiler doesn't support these features.
EVAL(U:any):any
Type: EVAL, SPREAD
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 16
EXPR PROCEDURE EVAL U;
BEGIN SCALAR FN;
RETURN
IF ATOM U THEN
IF NOT IDP U THEN U
ELSE IF A:=GET(U,VALUE) AND NOT(A:=CDR A EQ 'UNBOUND) THEN A
ELSE ERROR(29,LIST(U,"UNBOUND VARIABLE))
ELSE IF IDP CAR U THEN
IF A:=GETD CAR U THEN
IF CAR A EQ 'EXPR THEN APPLY(CDR A,EVLIS CDR U)
ELSE IF CAR A EQ 'FEXPR THEN APPLY(CDR A, LIST CDR U)
ELSE IF CAR A EQ 'MACRO THEN EVAL APPLY(CDR A, LIST U)
ELSE ERROR(28,LIST(CAR U,"UNDEFINED FUNCTION"))
ELSE IF A:=GET(CAR U,'VALUE) AND NOT((A:=CDR A) EQ 'UNBOUND)
AND NOT(A EQ CAR U) THEN EVAL A . CDR U
ELSE ERROR(28,LIST(CAR U,"UNDEFINED FUNCTION"))
ELSE IF PAIRP CAR U OR CODEP CAR U
THEN APPLY(CAR U, EVLIS CDR U)
ELSE ERROR(28,LIST(CAR U,"UNDEFINED FUNCTION"))
END;
Note: The identifier UNBOUND is not interned and the ERROR function
is not used.
APPLY(FN:any, ARGS:list):any
Type: EVAL, SPREAD
EXPR PROCEDURE APPLY(FN,ARGS);
BEGIN SCALAR A;
RETURN
IF ATOM FN THEN
IF IDP FN THEN
IF A:=GETD FN THEN
IF CAR A EQ 'EXPR THEN APPLY(CDR A, ARGS)
ELSE ERROR(31,LIST(FN,"NOT EXPR - APPLY"))
ELSE IF A:=GET(FN,'VALUE) AND NOT((A:=CDR A) EQ 'UNBOUND)
AND NOT(A EQ FN) THEN APPLY(A,ARGS)
ELSE ERROR(30,LIST(FN,"UNDEFINED FUNCTION - APPLY"))
ELSE IF CODEP FN THEN
IF LENGTH ARGS > 14 THEN ERROR(145,"TO MANY ARGS FOR EXPR")
ELSE {spread the actual parameters in ARGS, transfer to entry
point of the function and return the value returned
by the function}
ELSE ERROR(30,LIST(FN,"UNDEFINED FUNCTION - APPLY"))
ELSE IF CAR FN EQ 'LAMBDA THEN
IF A:=CADR FN AND IDP FN THEN ERROR(146,"ILLEGAL LAMBDA FORMAT")
ELSE IF (A:=LENGTH A - LENGTH ARGS) < 0 THEN
ERROR(147,"TO MANY ARGUMENTS SUPPLIED - APPLY")
ELSE IF A > 0 THEN
IF A=1 AND LENGTH ARGS =1 AND
{APPLY was called from EVAL to evaluate FEXPR call} THEN
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 17
APPLY(FN,LIST(CAR ARGS,{binding context pointer (BCP)}))
ELSE ERROR(148,"TO FEW ARGUMENTS SUPPLIED - APPLY")
ELSE <<{bind the actual parameters in ARGS to the formal
parameters in CADR FN};
A:=EVAL('PROGN . CDDR FN);
{unbind formal parameters};
A>>
ELSE IF CAR FN EQ 'FUNARG THEN
<<{unbind parameters back to BCP in CADDR FN};
A:=APPLY(CADR FN,ARGS);
{restore bindings};
A>>
ELSE IF CAR FN EQ 'LABEL THEN
<<{bind function in CADDR FN to formal name in CADR FN};
A:=APPLY(CADDR FN,ARGS);
{unbind name};
A>>
ELSE APPLY(EVAL FN,ARGS)
END;
!%EVAL(U:any,ENV:{list, integer}):any
Type: EVAL, SPREAD
EXPR PROCEDURE !%EVAL(U,ENV);
BEGIN SCALAR A;
IF PAIRP ENV THEN FOR EACH X IN ENV DO
{bind actual parameter in CDR X to formal parameter in CAR X}
ELSE {ENV is a BCP. Unbind parameters back to BCP};
A:=EVAL U;
{restore parameters};
RETURN A
END;
!%APPLY(FN:any,ARGS:list,ENV:{list, integer}):any
Type: EVAL, SPREAD
EXPR PROCEDURE !%APPLY(FN,ARGS,ENV);
!%EVAL(LIST('APPLY,FN,ARGS),ENV);
!*FUNCTION(FN:any)
Type: EVAL, SPREAD
!*FUNCTION is used instead of FUNCTION when it is necessary to pass
along an environment together with a function definition.
FEXPR PROCEDURE !*FUNCTION FN;
LIST('FUNARG,CAR FN,{BCP for current environment});
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 18
2.5 The Fap Loader
The Fap loader loads binary files generated by the compiler.
FLOAD(FILE-LIST:list):NIL
Type: NOEVAL, NOSPREAD
FILE-LIST is a list of identifiers or strings, each of which is the
name of a file with the implied extension FAP. FLOAD loads these
files with the Fap loader.
FEXPR PROCEDURE FLOAD FILES;
FOR EACH X IN FILES DO FISLM X;
FISLM(FILE:id):NIL
Type: EVAL, SPREAD
FISLM loads the Fap file FILE.FAP.
If the global variable *PREDEF is not NIL then the Fap loader prints
the message:
*** x REDEFINED
if the function x is redefined.
If the global variable *PURIFY is not NIL then the Fap loader will
try to convert the function links in the loaded binary code, from
slow to fast links.
2.6 Logical Routines And LAP Support
The following routines are mainly intended for use by the Lisp
Assembler (LAP).
!*BOX(POINTER:any):integer
Type: EVAL, SPREAD
!*BOX converts POINTER from its machine representation to a Lisp
number. !*BOX is the inverse operation to NUMVAL.
NUMVAL(NUM:number):any
Type: EVAL, SPREAD
NUMVAL converts the number NUM from its Lisp representation to its
machine representation. NUMVAL(!*BOX(x)) is EQ to x for any x.
!*BOX(NUMVAL(x)) is EQUAL to x if x is an INUM or a FIXNUM.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 19
MKCODE(ADR:integer, NARG:integer):codepointer
Type: EVAL, SPREAD
MKCODE converts the address ADR into a code pointer. NARG is the
number of arguments.
BOOLE(OPR:integer, A:integer, B:integer):integer
Type: EVAL, SPREAD
BOOLE performs a 36 bit Boolean operation on A and B. OPR specifies
which of 16 Boolean operations to perform. These operations are
defined in the following table of the result for the i:th bit in the
answer with given value of OPR and i:th bit of A and B. In the table
"-" stands for boolean not.
A,B 0,0 1,0 0,1 1,1
OPR
0 0 0 0 0 0
1 A↑B 0 0 0 1
2 -A↑B 0 0 1 0
3 B 0 0 1 1
4 A↑-B 0 1 0 0
5 A 0 1 0 1
6 -A=B 0 1 1 0
7 AvB 0 1 1 1
8 -A↑-B 1 0 0 0
9 A=B 1 0 0 1
10 -A 1 0 1 0
11 -AvB 1 0 1 1
12 -B 1 1 0 0
13 Av-B 1 1 0 1
14 -Av-B 1 1 1 0
15 1 1 1 1 1
As can be seen from above, OPR is the number whose binary
representation is the corresponding table entry.
LSH(NUM:integer, SHIFT:integer):integer
Type: EVAL, SPREAD
LSH performs a logical 36 bit left shift of SHIFT places on NUM. If
SHIFT is negative, then NUM will be shifted right. In both cases,
vacated bits are filled with zeros.
EXAMINE(ADR:integer):integer
Type: EVAL, SPREAD
EXAMINE converts the word at address ADR in memory to a Lisp number
and returns it.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 20
DEPOSIT(NUM:number, ADR:integer):integer
Type: EVAL, SPREAD
DEPOSIT deposits the 36 bit machine representation of NUM in the word
at address ADR in memory. NUM is returned as value.
2.7 The Alternative Scanner SCAN
Lisp uses a table driven scanner. There are two scanner tables, the
Standard Lisp table and a second table that may be modified by the
user for the purpose of implementing scanners for other languages.
The syntax when using the second table is:
<alphabetic> ::= A|B| ... |Z|a| ... |z
<extra letter> ::= <initially no character>
<letter> ::= <alphabetic>|<extra letter>
<ignored> ::= <tab>|<lf>|<vtab>|<ff>|<cr>|<space>
<digit> ::= 1|2|3|4|5|6|7|8|9
<delimiter> ::= <all characters except letter, digit or
ignored>
<special control> ::= <null>|↑Z|+|-|.|E|<comment start>|<comment
end>|<string start>|<string end>|<slashifier>
<identifier> ::= <letter>
::= <slashifier><any character>
::= <identifier><digit>
::= <identifier><identifier>
<comment> ::= <comment start><any characters except comment
end>
::= ↑Z<any characters except lf or ff><lf or ff>
<string-text> ::= <any character except string end>
::= <string end><string end>
::= <string-text><string-text>
<string> ::= <string start><string-text><string end>
The syntax for numbers is as usual (see 1.3), except that leading
signs ("+" or "-") in numbers are treated as delimiters.
In the above syntax letter, delimiter, ignored, comment start,
comment end, string start, string end and slashifier can be changed
by the user. Initially comment start is "%", comment end is <lf>,
string start and string end is " (double quote) and the slashifier is
"!", i.e. the same as for the ordinary Lisp scanner. Note that "↑Z"
starts a comment also when comment start has been defined as
something else. Note also that the comment end is not commented out
in a comment started by something else than ↑Z.
2.7.1 Scanner Functions - In the following descriptions, all
characters are specified by their ASCII code. E.g. " " is (in octal)
40 and "A" is 101.
SCANSET(SWITCH:extraboolean):extraboolean
Type EVAL, SPREAD
SCANSET switches the scanners attention between the two scanner
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 21
tables. If SWITCH is NIL the Standard Lisp scanner table is used,
otherwise the user settable scanner table is used. SCANSET returns
the previous setting.
SCANINIT(COMMENT-START:integer, COMMENT-END:integer,
STRING-START:integer, STRING-END:integer, SLASHIFIER:integer):NIL
Type EVAL, SPREAD
SCANINIT reinitializes the scanner so that all characters except
alphabetics and digits, are delimiters (no ignored). It then sets
comment start, comment end, string start, string end and slashifier
to be the specified characters.
DELIMIT(CHAR:integer):integer
Type EVAL, SPREAD
DELIMIT specifies to the scanner that CHAR is a delimiter. CHAR is
returned as value.
LETTER(CHAR:integer):integer
Type EVAL, SPREAD
LETTER specifies to the scanner that CHAR is a letter, and thus
allows CHAR to be in an identifier. CHAR is returned as value.
IGNORE(CHAR:integer):integer
Type EVAL, SPREAD
IGNORE specifies to the scanner that CHAR is not to be returned as a
delimiter from scan, but instead will be ignored. However, CHAR will
still function as a delimiter inside a number or an identifier.
SCAN():integer
Type EVAL, SPREAD
SCAN reads an atom or delimiter and sets the variable SCNVAL to the
value read, and returns a number corresponding to the syntactical
type read as follows:
Type SCAN value SCNVAL value
identifier 0 the uninterned identifier
string 1 the string
number 2 the number
delimiter 3 an interned id with the delimiter
as print name
SCAN will give different results depending on which scanner is used.
READ checks which scanner is used and will temporarily switch to the
Standard Lisp scanner if that scanner is not already used. An error
in READ might leave the Standard Lisp scanner in use even though it
wasn't before the READ.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 22
2.8 Other Functions
INTERNP(U:any):extra-boolean
Type: EVAL, SPREAD
INTERNP returns T if U is an interned id, otherwise NIL.
INUMP(U:any):extra-boolean
Type: EVAL, SPREAD
INUMP returns U if it is an INUM, otherwise NIL.
BIGP(U:any):extra-boolean
Type: EVAL, SPREAD
BIGP returns U if it is a BIGNUM, otherwise NIL.
GCD(A:integer, B:integer):integer
Type: EVAL, SPREAD
GCD returns the greatest common divisor of A and B.
COMPRESS(U:id-list):any
Type: EVAL, SPREAD
COMPRESS is similar to the definition in [1], but it is currently
more general. It uses READ to read the character ids in U and it can
read an arbitrary S-expression.
EXPLODE(U:any):id-list
Type: EVAL, SPREAD
EXPLODE is similar to the definition in [1], but it is currently more
general as it can explode any S-expression. This is done by using
PRIN1 to print to a list. EXPLODE uses the Standard Lisp scanner
table and will temporarily switch scanner tables if necessary.
EXPLODEC(U:any):id-list
Type: EVAL, SPREAD
EXPLODEC is similar to EXPLODE but it uses PRIN2 instead of PRIN1.
This means that the escape character does not prefix special
characters and strings are not enclosed by " ... ".
SET and SETQ
are the same as in [1] except that they do not declare unknown
variables to be FLUID.
FLUID, UNFLUID and GLOBAL
are similar to their definition in [1] but they presently have some
side effects used by REDUCE.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 23
PUTD(U:id,V:id,W:any):id
Type: EVAL, SPREAD.
If U is flagged LOSE, then PUTD does nothing. If V is EXPR, FEXPR or
MACRO, then U is defined as a function of type V with function
property W else PUTD is the same as PUT.
If *COMP is on and FLAGP(V,'COMPILE) and W is a LAMBDA expression
then W is compiled. Initially EXPR and FEXPR are flagged COMPILE.
ATSOC(U:any, V:alist):{dotted-pair, NIL}
Type: EVAL, SPREAD
ATSOC is similar to ASSOC but it uses EQ instead of EQUAL.
EXPR PROCEDURE ATSOC(U, V);
IF NULL V THEN NIL
ELSE IF U EQ CAAR V THEN CAR V
ELSE ASSOC(U, CDR V);
ASCII(COD:integer):integer
Type: EVAL, SPREAD
ASCII returns an non-interned single character identifier such that
the ASCII code for the character is COD.
Example: (ASCII 101) returns an identifier with print name "A".
COND([U:cond-form]):any
Type: NOEVAL, NOSPREAD
Cond-form is more general than that defined in [1] 2.3. A cond-form
is a list of N+1 element lists of the form:
(ANTECEDENT:any CONSEQUENT-1:any ... CONSEQUENT-N:any)
where N is a non-negative integer.
The Antecedents are evaluated in their order of appearance until a
non-NIL value is encountered. The consequents of the selected U are
evaluated from left to right and the value of the last consequent is
returned as value of COND. If there are no consequents then the
value of the antecedent is returned.
FREEZE(U:boolean)
Type: EVAL, SPREAD
FREEZE halts the Lisp system in such a way that it can later be
restarted. The value of U determines what happens when the system is
restarted: If U is true (not NIL) then any additional memory is
allocated and the the system is back at the top level. If U is NIL
then the system is restored to where it was (except for that all
files are closed), and NIL is returned as value of FREEZE.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 24
2.9 Memory Allocation
The Standard Lisp system has many different areas of memory for
storing data which can independently vary in size. Some LISP
applications demand larger allocations for these areas than others.
To allow users to adjust the sizes of these areas to their own needs,
a memory allocation procedure exists.
2.9.1 Storage Allocation Areas -
BINARY PROGRAM SPACE Compiled functions and vectors.
FREE STORAGE LISP pairs
FULL WORD SPACE Numbers and print names
BIT TABLES Used by garbage collector
REGULAR PUSHDOWN LIST Return addresses for function calls and
local variables in interpreter and
compiled code.
SPECIAL PUSHDOWN LIST Old bindings of fluid variables.
EXPANDED CORE I/O buffers.
The various areas are differently allocated on a Tops-10 machine as
compared with a Tops-20 or Tenex machine. The memory map for the two
cases are as follows:
TOPS-10 TENEX or TOPS-20
TOP OF CORE
-------------------------
| BINARY PROGRAM SPACE |
-------------------------
BOTTOM OF HIGH CORE
TOP OF CORE TOP OF LOW CORE
------------------------- -------------------------
| EXPANDED CORE | | EXPANDED CORE |
------------------------- -------------------------
| SPECIAL PUSHDOWN LIST | | SPECIAL PUSHDOWN LIST |
------------------------- -------------------------
| REGULAR PUSHDOWN LIST | | REGULAR PUSHDOWN LIST |
------------------------- -------------------------
| BIT TABLES | | BIT TABLES |
------------------------- -------------------------
| FULL WORD SPACE | | FULL WORD SPACE |
------------------------- -------------------------
| FREE STORAGE | | FREE STORAGE |
------------------------- -------------------------
| BINARY PROGRAM SPACE | | LISP INTERPRETER |
------------------------- -------------------------
| LISP INTERPRETER | BOTTOM OF CORE
-------------------------
BOTTOM OF CORE
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 25
2.9.2 Allocation -
When the Lisp system is initially started, it asks the user:
ALLOC?
If this is answered with "Y" then the following questions are asked,
otherwise the default values are used. The questions vary slightly
between a Tops-10, a Tops-20 and a Tenex machine:
Tops-10 Tops-20 Tenex Default Meaning
Core (K): Core (K): 12 K words core (decimal).
SYS: SYS: SYS: Meaning of SYS: in OPEN.
SYS: dir# Dir# for Meaning of SYS: in OPEN.
<REDUCE> or 0.
FWDS= FWDS= FWDS= 400+1/4FREE Words full word space
(octal)
BPS.= 2000 Words binary program
space (octal)
SPDL= SPDL= SPDL= 1000 Words special pushdown
list (octal)
RPDL= RPDL= RPDL= 1000 Words regular pushdown
list (octal)
HASH= HASH= HASH= 77 Number of buckets in
oblist (octal)
There are two basic responses to any of these questions:
1. A space causes the default value to be used.
2. A number ended by a space or a cr causes the number to be
used.
2.9.3 Reallocating Space -
CORE(SIZE:integer):integer
Type: EVAL, SPREAD
If SIZE is 0 then CORE returns the (low-)core size including extended
core. If SIZE is negative then CORE returns the (low-)core size
excluding extended core (i.e. Lisp allocated core).If SIZE is a
positive integer then the system will try to allocate SIZE K words
(low-)core.
If SIZE is smaller than current Lisp alloc. core, then the warning
message:
*** CAN'T CUT CORE INTO ALLOCATED SPACE
is printed, no action is taken and the value returned is the same
as that when SIZE is negative (i.e. minimum positive value of
SIZE).
Otherwise the core will be expanded to SIZE K words and (if not a
(EXCORE n) has been executed) then the additional core will be
reallocated in the following way:
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 26
1/4 for full words space
1/64 for each push down list
about 1/16 for bit tables
the remainder for free storage (Lisp cells)
The above described allocation scheme is also used if the run of Lisp
is stopped (by an error or by a ↑C) and then either started again by
the START command or SAVEd and then RUN again. When BPS is in high
core (Tops-20 or Tenex) then it is automatically expanded as long as
there is free high core. When BPS is in low core (Tops-10) then The
binary program space can not actually be expanded, but an extra
binary program space can be defined in the expanded core by the
following function.
EXCORE(ARG:any):any
Type: EVAL, SPREAD
EXCORE has two effects:
1. The allocation procedure described in CORE, is inhibited if
ARG is not NIL.
2. In case of a Tops-10 machine, there is also a second effect:
If ARG is a positive integer then ARG K words of binary
space is defined in extra core and BPORG and BPEND are set
to the beginning and end of this extra BPS. If ARG is 0 or
NIL then BPORG and BPEND are set to their old values in
ordinary BPS if they have been set to point into extra BPS.
EXCISE():T
Type: EVAL, SPREAD
EXCISE contracts core to its size excluding extra core.
Note that if a Lisp core image is saved and later RUN, then the extra
core will be reallocated as described in CORE.
2.10 The Garbage Collector
The garbage collector in LISP is called whenever FREE STORAGE or FULL
WORD SPACE is exhausted. The garbage collector analyzes the entire
state of list structure which is pointed to by either the OBLIST, the
regular pushdown list, the special pushdown list, list arrays, and a
few other special cells. By recursively marking all words in free
and full word spaces which are pointed to in this manner, it is
possible to determine which words are not pointed to and are
therefore garbage. Such words are collected together on their
respective free storage or full word space lists.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 27
RECLAIM():NIL
Type: EVAL, SPREAD
RECLAIM causes a garbage collection to occur and returns NIL.
GCTIME():integer
Type: EVAL, SPREAD
GCTIME returns the number of milliseconds LISP has spent garbage
collecting since it was started.
SPEAK():integer
Type: EVAL, SPREAD
SPEAK returns the total number of CONSes which have been executed
since LISP was started.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 28
3.0 GLOBAL (FLUID) SYSTEM VARIABLES
*RAISE, NIL and T are implemented as described in [1]..
The following variables differ from those defined in [1].
*COMP - Initial value = NIL
See description of PUTD in section 2.8.
EMSG* - Initial value = NIL
Most of the system errors do not use ERROR and only part of their
message is found as the value of EMSG*. See ERROR.
$EOF$ - Initial value = $EOF$
$EOF$ is returned to a surrounding ERRORSET (or the top level if
there is none) when a input function reaches the end of the currently
selected input file.
$EOL$ - Initial value = ↑← (Ascii 37)
See description of ↑← at the end of section 2.3.
The following variables are extensions of Standard Lisp:
*BAKGAG - Initial value = NIL
*BAKGAG is the third argument to ERRORSET. If *BAKGAG is not NIL
then a backtrace will be printed when an error occurs. For the
different forms of backtraces depending on the value of *BAKGAG see
ERROR.
*DDTIN - Initial value = NIL
*DDTIN controls whether input from the TTY is seen line by line or
character by character.
If *DDTIN is NIL, then input is seen line by line, i.e. the input
buffer is only sent to the Lisp system when a carriage return, a line
feed, a form feed or an altmode is typed on the TTY. This means that
terminal editing characters like ↑U, <rub> etc. (or corresponding in
a Tenex system) can be used.
If *DDTIN is not NIL (e.g. T) then input is seen character by
character, i.e. each character is sent to the Lisp system when it is
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 29
typed on the TTY. This means that editing characters can't be used,
but <rub> will delete the entire S-expression being read and start
reading again.
*ERRMSG - Initial value = T
*ERRMSG is the second argument to ERRORSET. If *ERRMSG is NIL then
no error message will be printed. If *ERRMSG is 0 then error
messages will be printed on the currently selected output channel.
If *ERRMSG is anything else, then error messages will be printed on
the TTY.
*ECHO - Initial value = NIL
If *ECHO is not NIL then all characters read from a file (not TTY)
are echoed to the current output file. No conversion from lower to
upper case is done of the echoed character regardless of the value of
!*RAISE. If a ↑D is encountered in the file, the program will wait
until a " " (a space) is typed on the TTY and then continue. The ↑D
is not echoed.
If *ECHO is NIL no echoing takes place.
*GCGAG - Initial value = NIL
If *GCGAG is not NIL when a garbage collection occurs then the
following is printed on the TTY:
either
*** FREE STG EXHAUSTED
or
*** FULL WORD SPACE EXHAUSTED
or nothing
followed by
*** n FREE STG, m FULL WORDS AVAILABLE
where n and m are the number of words (cells) printed in the current
radix.
If *GCGAG is NIL then these messages are not printed.
*MSG - Initial value = T
If *MSG is NIL then no warnings will be printed, e.g. PUTD will not
print any message when a function is redefined.
*NOPOINT - Initial value = NIL
If *NOPOINT is NIL then integers printed (or EXPLODEd) with a decimal
radix (BASE = 10.) are followed by a ".".
If *NOPOINT is not NIL then decimal integers are not printed with a
following ".".
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 30
*NOUUO - Initial value = NIL
If *NOUUO is not NIL then slow links in compiled code are converted
to fast links when the code is executed. Fast links can't be TRaced
as can slow links.
*PREDEF - Initial value = NIL
If *PREDEF is not NIL then the Fap loader will print
*** x REDEFINED
on the TTY, when x is a function that is being redefined.
If *PREDEF is NIL then no message is printed.
*PURIFY - Initial value = NIL
If *PURIFY is not NIL then the Fap loader will try to convert slow
links to fast links in the loaded binary code.
If *PURIFY is NIL then this conversion will not take place at load
time. It will take place when executing the code if *NOUUO is not
NIL.
*RSET - Initial value = NIL
If an error occurs that is not surrounded by an ERRORSET so that the
system will go to the top level, then the value of *RSET determines
whether fluid variables will be restored to their top level values or
kept at the values they had when the error occurred:
If *RSET is NIL then fluid variables will be restored to top level
values.
If *RSET is not NIL then the current values will be kept.
BASE - Initial value = 10 (decimal)
The value of BASE is used as radix when printing integers. Floating
point numbers are always decimal.
IBASE - Initial value = 10 (decimal)
The value of IBASE is used as radix when reading integers. Floating
point numbers are always decimal.
INITFN* - Initial value = NIL
If INITFN* is not NIL, then it must be a function of no arguments.
This is an initialization function that will be evaluated after a
Lisp error return to the top level has occurred or when a BELL has
been typed or when a Lisp core image is started again or when the
memory is reallocated by CORE.
INITFN* is useful when it is desirable to change the top level of
Lisp.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 31
(SETQ INITFN!* (FUNCTION EVALQUOTE))
causes the top level to become EVALQUOTE instead of EVAL.
BPEND - Value = Address of end of BPS
(NUMVAL BPEND) points to the end of BPS.
BPORG - Value = Address of beginning of free BPS
(NUMVAL BPORG) points to the beginning of free BPS.
INC* - Value = Channel number for currently selected input channel.
INC* is updated by calls to RDS and should not be changed in any
other way. INC* is NIL when the current input channel is the TTY.
OUTC* - Value = Channel number for currently selected output channel.
OUTC* is updated by calls to WRS and should not be changed in any
other way. OUTC* is NIL when the current output channel is the TTY.
OBLIST - Value = List of lists of interned identifiers.
See 1.7
SCNVAL - Initial value = NIL
See SCAN.
SYSTEM* - Value = 1, 0 or -1.
SYSTEM* indicates what operating system the current Lisp system is
intended for:
System Value of SYSTEM*
Tenex 1
Tops-10 0
Tops-20 -1
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 32
4.0 ERROR MESSAGES AND WARNINGS
The Lisp system checks for some error conditions and prints messages
accordingly, but some of the error checking described in [1] is
currently not implemented.
In particular CAR, CDR, RPLACA and RPLACD do not check that their
argument is a pair. This means also that improper arguments to NCONC
or ASSOC are not checked.
Illegal use of GO or RETURN is not checked, indeed GO and RETURN can
currently be used almost anywhere in interpreted code.
The use of an id as both a function and a variable is currently
allowed.
Erroneous conditions (e.g. illegal CAR or CDR) that are not tested,
result in either the wrong message at some later time, or no error
message at all. In the latter case the system has screwed itself
without complaining.
When error messages are printed, it is usually difficult to determine
which function caused the error and which functions called it. In
this situation, the BACKTRACE is useful, (see *BAKGAG). *RSET is
also useful to determine the values of variables at the time of the
error.
The following is a list of error messages, their cause and in some
cases their remedy. The messages are grouped in four groups and they
are listed alphabetically within each group. The "*****" that
precedes error messages and the "***" that precedes warnings have
been omitted in the description. The error messages for some
optional features that are not normaly available, are included. The
descriptions of possible causes for the errors, sometimes includes
functions that are not normaly available.
4.1 Error Messages Not Starting With A Bad Part
These messages are of the type:
***** <message>.
BIGNUM UNSUITABLE AS ARGUMENT
BOOLE, DEPOSIT, EXAMINE, BINO, OPEN, ASCII, MKCODE, SETMOD,
CPLUS, CDIF, CTIMES, CRECIP, MKVECT, LSH, %SOSSWAP, WBLK or
EXCORE, was given a number that was not an INUM or a FIXNUM.
This error might also occur in some other routines, if BPORG
or BPEND have been set to BIGNUMs.
BINARY PROGRAM SPACE EXCEEDED
LAP, (ARRAY, EXARRAY or LOAD) has exceeded BINARY PROGRAM
SPACE. If you are running on a Tenex or Tops-20 machine,
this should not happen as the available BPS is about 100 K.
If you are running on a Tops-10 machine you can either start
again from a fresh LISP and allocate more BPS, or you can use
EXCORE.
CAN'T EXPAND CORE
CORE, EXCORE, OPEN, (LOAD or ED) failed to expand core. In
the case of CORE or EXCORE, try again with a smaller
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 33
argument. A possible remedy might also be to EXCISE and then
try again.
COULDN'T SSAVE
LSSAVE failed.
COULDN'T SWAP SUCCESSFULLY
%SOSSWAP failed.
DOT CONTEXT ERROR
READ doesn't like dots adjacent to parentheses or other dots.
EXCORE x ON TOP LEVEL REQUIRED
This error only occurs on a Tops-10 machine. There is not
enough BPS for the Fap loader to load code into BPS. As the
input is coming from a file, the Fap loader can't use EXCORE
to get more BPS, as that would clobber the input buffer.
Execute (EXCORE x) and try again.
FASLOAD BUG
A bug has been discovered in the Fap loader.
FASLOAD EMPTY FILE
A file to be loaded by the Fap loader was empty or the
fisltable is not a vector.
FASLOAD EXCEEDS BPS
The Fap loader has run out of BPS. For a remedy, see message
under BINARY PROGRAM SPACE EXCEEDED
FASLOAD FORMAT ERR
Something went wrong during the Fap loading process. There
might be a format error in the Fap file. This error might be
preceded by another Lisp error message telling what went
wrong.
FASLOAD GC-PRO ERR This error occurred during the last stage of the
Fap loading process.
FISLTABLE FULL
The Fap loader needed a bigger fisltable. On a Tops-10
system, set FISLSIZE to a larger number and try again. On a
Tops-20 or a Tenex system, the fisltable should be big
enough, but it can be enlarged by N words, by the following:
subtract N from BPORG, add N to FISLSIZE, execute
(SETQ FISLTABLE (MKVECT (DIFFERENCE (TIMES2 FISLSIZE 2) 1)))
and set BPORG to its old value.
FLOATING OVERFLOW
A numeric routine detected a floating point overflow.
GARBAGED OBLIST
This error is always preceded by some other error. The error
message routine for that error discovered an illegal address
in the OBLIST or on the property list of some id on the
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 34
OBLIST. You are in trouble.
ILLEGAL LAMBDA FORMAT
APPLY was given a lambda expression whose parameter list was
an id other than NIL.
INPUT ERROR
Bad data was read from the selected input channel.
LISP.ED MISSING
An ED or GRINDEF command (not usually available) has been
issued, but the system couldn't find the Alvine code file
LISP.ED. Either you have defined SYS: to be a device on
which LISP.ED isn't found, or there is no such file at your
installation.
LISP.ED OR LOD MISSING
Either LISP.ED was not found (see previous message comment),
or a LOAD command has been issued, but the file LISP.LOD
wasn't found, in which case the situation is similar to an
absence of LISP.ED.
LISP.LOD MISSING
LISP.LOD wasn't found, see previous message comment.
LISP.SYM not found!! No load
A LOAD command has been issued, the file LISP.LOD was found,
but the symbol table file LISP.SYM wasn't found.
MISSING PRINT NAME IN OBLIST
INTERN found a member of the OBLIST that has no print name.
You are in trouble.
MORE THAN ONE S-EXPRESSION - COMPRESS
COMPRESS objects to a list which constitutes the characters
for more than one S-expression.
NO FISLTABLE ROOM
This can only occur on a Tops-10 machine. The available BPS
is not enough for the Fap loaders fisltable. You need to get
more BPS.
NO FREE STG LEFT
All free storage (Lisp cells) is used. The garbage collector
couldn't find any unused cells. The unbinding of the stacks
that occurs after this error (and others) will normaly
release some storage. If that isn't enough, you can get more
storage by using the CORE function.
NO FULL WORDS LEFT
All full words are being used for print names and numbers.
The problem and its solution is similar to FREE STG.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 35
NO INPUT - RDS
The argument to RDS was not a channel OPENed for input.
NO I/O CHANNELS LEFT
OPEN failed to find a free I/O channel. There is a maximum
of 16 (including the TTY) open I/O channels at the same time.
NOGO
This usually follows a previous error message from the Fap
loader.
NO LIST - COMPRESS
NIL has been given as argument to COMPRESS.
NON-INTEGRAL OPERAND
DIVIDE, REMAINDER and GCD only accepts integers as arguments.
NO OUTPUT - WRS
The argument to WRS was not a channel OPENed for output.
NO PRINT NAME
Some routine couldn't find a print name. This might occur in
several ways:
1. The argument to INTERN, SETPCHAR or (on Tenex or Tops-20
machines) the element after DIR: in argument to OPEN,
was not a string or an id.
2. The argument to PRINC or SKIPTO or an element of the
argument to COMPRESS was not a string, an id or an INUM.
3. The argument to REMOB, INTERNP or one of the above
functions, was a string or an id without a print name.
NUMBER NOT DIGIT
The argument to PRINC or SKIPTO or an element of the argument
to COMPRESS was an INUM that was either negative or larger
than 9.
OUTPUT ERROR
Data was improperly written on the selected output device.
Possibly a write-locked DECTAPE.
PDL OVERFLOW FROM GC - CAN'T CONTINUE
There is not enough space on the regular stack to finish
garbage collecting. This error forces the Lisp system to go
to the top level, ignoring any ERRORSETs that might be in
effect. The problem and its solution is similar to the error
NO FREE STG LEFT.
TOO FEW ARGUMENTS SUPPLIED - APPLY
TOO MANY ARGUMENTS SUPPLIED - APPLY
APPLY checks that interpreted functions have correct number
of arguments.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 36
TOO MANY ARGS FOR EXPR
A function that spreads its argument, an EXPR, was given more
than 14 arguments.
ZERO DIVISOR
The second argument to DIVIDE, REMAINDER or QUOTIENT was
zero.
4.2 Error Messages Starting With A Bad Part
The following messages are all of the form:
***** x <message> They are ordered alphabetically after the
message part.
x CALLED AS EXPR
This error occurs when a call to "x" from a compiled function
is to be performed and "x" is a FEXPR but the call has been
compiled as if "x" was an EXPR. This means that the
arguments to "x" have been evaluated when the call is made.
At present this error doesn't occur. Instead the system
makes a (dubious) try to recover. It quotes all the
arguments and makes a list of them and then calls "x" with
this list as argument.
x CAN'T FIND FILE
OPEN couldn't find the file specified by "x". If you were
looking for a file on SYS:, maybe your definition of SYS: is
wrong.
x DEVICE NOT AVAILABLE
The device specified to OPEN in the file name list "x", was
not available.
x DIRECTORY FULL
The directory is full for the device specified in the file
name list "x".
x FILE IS WRITE PROTECTED
OPEN found that the file specified by "x" is write protected
and may not be opened for output.
x ILLEGAL ARG TO LINELENGTH
The argument "x" to LINELENGTH wasn't NIL or a positive INUM.
x ILLEGAL ARG TO PAGELENGTH
The argument "x" to PAGELENGTH wasn't NIL or a non-negative
INUM.
x ILLEGAL DEVICE
The device specified in the file name list "x" doesn't exist
or it is of the wrong type. E.g. it is not possible to open
the lineprinter for input.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 37
x ILL MEM REF FROM y
An illegal memory reference was made. "x" is the address (in
octal) of the instruction where the error was made. "y" is
the function containing that instruction. "y" is found in a
similar way to the BACKTRACE, so that ? denotes an internal
routine and NIL denotes a position outside normal code, e.g.
in free storage.
This error is usually caused by taking CAR or CDR of an atom.
x ILL UUO FROM y
An illegal instruction was executed at address "x" in the
function "y". ? and NIL have the same meaning as in the
previous error message.
x IS NOT A CHANNEL NAME
RDS, WRS or CLOSE was given "x" as argument. "x" was not NIL
or an integer between 0 and 15.
x IS NOT AN IDENTIFIER
"x" should have been an identifier. The functions that
checks for identifiers, are: PUTD, PUT, FLAG, REMFLAG, SET
and SETQ. The elements of the parameter list in a PROG or a
lambda expression must also be ids.
x IS NOT A NUMBER
An arithmetic routine was given an argument "x", that wasn't
a number.
x IS NOT A VECTOR
The second argument to PUTV or GETV must be a vector. "x"
wasn't.
x MAY NOT BE CHANGED
"x" is one of the ids NIL and T. SET and SETQ may not change
the value of these ids.
(x y) MISMATCHED - PAIR
The two arguments "x" and "y" to PAIR were not lists of the
same length.
x MODULE NOT FOUND
FLOAD or FISLM was given the name of a module that couldn't
be found. Your definition of SYS: may be wrong.
x NOT A KEYWORD FOR OPEN
"x" was the second argument to OPEN, but it was not one of
INPUT, OUTPUT, INBIN or OUTBIN.
x NOT EXPR - APPLY
"x" was the first argument to APPLY. It was a function but
not an EXPR.
x PUSHDOWN CAPACITY EXCEEDED
The "x" pushdown stack has overflowed. "x" is either REG
(regular) or SPEC (special). The overflow is usually caused
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 38
by non-termination of recursion. If this is not the case but
the recursion just is very deep, then you can enlarge the
stacks by using CORE.
x SUBSCRIPT OUT OF RANGE
The first argument "x" to GETV or PUTV was out of range for
the vector specified by the second argument.
x TOO BIG VECTOR
MKVECT was given "x" argument, but there is not space in the
BPS for a vector of size "x"+1.
x UNBOUND VARIABLE - EVAL
EVAL tried to evaluate the id "x" and found that it had no
value. You probably forgot to QUOTE "x".
x UNDEFINED FUNCTION
The function "x" is not defined.
x UNDEFINED FUNCTION - APPLY
The function "x" is not defined.
x UNDEFINED PROG TAG - GO
A GO in some interpreted function had an undefined label "x".
x UNDEFINED UUO
The compiled function "y" made a call to "x", but "x" was not
a function. Note that a MACRO is not accepted as a function
by calls from compiled functions.
4.3 Warnings And Diagnostic Messages
These messages are preceded by a "***".
CAN'T CUT CORE INTO ALLOCATED
The argument to CORE was to small. See CORE.
CAN'T EXCISE
CORE or EXCISE couldn't reallocate or excise extra core as
EXCORE had been executed earlier with an argument that was
not NIL. If you want to excise or reallocate extra core,
execute (EXCORE NIL), then try again.
EXCORE x PERFORMED
This message can only occur on a Tops-10 machine. The Fap
loader needed more BPS than was available and used EXCORE to
get more BPS. This message is not printed if *MSG is NIL.
FREE STG EXHAUSTED
The free storage (the Lisp cells) was exhausted and caused a
garbage collection. This message is not printed when *GCGAG
is NIL.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 39
FULL WORD SPACE EXHAUSTED
The full word space got exhausted and caused a garbage
collection. This message is not printed when *GCGAG is NIL.
WOULDN'T REDUCE CORE
%SOSSWAP couldn't reduce the core to what it was. This
message is only possible on a Tops-10 machine. %SOSSWAP is
normally not implemented on Tops-10 machines.
(F)SUBR CONVERTED TO (F)EXPR
The function types FSUBR and/or SUBR have been replaced by
FEXPR and/or EXPR by the Fap loader when loading a module.
This message is not given more than once for each module
loaded. The module was compiled before the function types
FSUBR and SUBR where deleted from Standard Lisp. Recompile
the module and the message will go away. This automatic
conversion will removed sometime in the future, an undefined
function error will then occur at run time instead.
(F)SUBR CONVERTED TO (F)EXPR IN PUTD
A call to PUTD used the old function type FSUBR or SUBR that
are now replaced by FEXPR and EXPR. Use FEXPR or EXPR
instead. Compiled functions are now distinguished by the
predicate CODEP. Using (F)SUBR will cause an error sometime
in the future when this conversion is removed.
x FREE STORAGE, y FULL WORDS AVAILABLE
There are "x" Lisp cells and "y" full words available after
the garbage collection that just occurred. This message is
not printed if *GCGAG is NIL.
x REDEFINED
This message is printed by PUTD or by the Fap loader when the
function "x" has been redefined. The message from the Fap
loader is not printed if *PREDEF is NIL. The message from
PUTD is not printed if *MSG is NIL.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 40
5.0 DIFFERENCES BETWEEN LISP 1.6 AND STANDARD LISP
The following is a list of the major differences between LISP 1.6 and
Standard Lisp on the DECsystem 10 and 20:
1. There are no LSUBRs and consequently no ARG or SETARG.
2. An EXPR may have up to 13 arguments.
3. SUBR and FSUBR is replaced by EXPR and FEXPR. Compiled
functions are distinguished from interpreted functions by
the predicate CODEP.
4. There are no arrays, so ARRAY, EXARRAY and STORE are not
defined. Use vectors instead.
5. Alvine (ED, GRINDEF) is normally not implemented.
6. The Lisp LOADer, *PUTSYM, PUTSYM, *GETSYM and GETSYM are
normally not implemented.
7. The trace functions TRACE and TRACET are replaced by the
somewhat different TR and TRST.
8. The I/O functions DSKIN and SYSIN are not defined.
9. The functions APPEND, NCONC, DIFFERENCE, QUOTIENT, GREATERP
and LESSP are now EXPRs and take only two arguments. BOOLE
takes 3 arguments.
10. ASSOC and SASSOC uses EQUAL instead of EQ. ATSOC is similar
to ASSOC but uses EQ.
11. REMOB is a SUBR with one argument.
12. Computed GO labels are not allowed, i.e. the argument to GO
must be an id.
13. GC, MAKNAM and PRINC are renamed to RECLAIM, COMPRESS and
PRIN2.
14. OUTPUT, INPUT, OUTBIN, INBIN, OUTC and INC are replaced by
OPEN, RDS, WRS and CLOSE.
15. The mapping functions (MAP, MAPC, MAPCAR, MAPLIST, MAPCAN
and MAPCON), take their arguments in the opposite order.
16. The functions INITFN, BAKGAG, GCGAG, NOUUO, DDTIN, RAISE,
FECHO and *RSET are replaced by variables.
17. ERRSET is replaced by the SUBR ERRORSET.
18. *EXPAND and *EXPAND1 are replaced by EXPAND.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 41
19. The characters "%", "[", "]", "<", ">", "@", "'", "/" and
"!" have a different meaning. See RDSLSH.
20. The BIGNUM and SCAN packets are permanently resident.
21. The basic datatypes are differently implemented. The format
for property lists is changed. Flags and properties can
never clash.
22. A string is not the same as an uninterned id.
23. CHRCT is replaced by POSN.
24. *EVAL is renamed to EVAL. APPLY is an EXPR with 2 args.
%APPLY and %EVAL support the FUNARG feature.
25. PROG2 is replaced by PROGN
26. The following functions are not defined: CSYM, LAST,
DEFPROP, GETL, MAKNUM and UNTYI.
27. Several new functions are defined.
28. End of line is treated differently. See ↑← and $EOL$.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 42
6.0 REFERENCES
[1] J. B. Marti, A. C. Hearn, M. L. Griss, C. Griss, Standard LISP
Report, Utah Computational Physics, UCP-60, January 1978.
[2] Lynn H. Quam, Whitfield Diffie, Stanford LISP 1.6 Manual,
Stanford Artificial Intelligence Laboratory, Operating Note
28.7.
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 43
Index
$EOF$ . . . . . . . . . . . . . . 28
$EOL$ . . . . . . . . . . . . . . 28
%APPLY . . . . . . . . . . . . . . 17
%EVAL . . . . . . . . . . . . . . 17
*BAKGAG . . . . . . . . . . . . . 10, 28
*BOX . . . . . . . . . . . . . . . 18
*COMP . . . . . . . . . . . . . . 23, 28
*DDTIN . . . . . . . . . . . . . . 28
*ECHO . . . . . . . . . . . . . . 29
*ERRMSG . . . . . . . . . . . . . 10, 29
*FUNCTION . . . . . . . . . . . . 17
*GCGAG . . . . . . . . . . . . . . 29
*MSG . . . . . . . . . . . . . . . 29
*NOPOINT . . . . . . . . . . . . . 29
*NOUUO . . . . . . . . . . . . . . 30
*PREDEF . . . . . . . . . . . . . 30
*PURIFY . . . . . . . . . . . . . 30
*RAISE . . . . . . . . . . . . . . 28
*RSET . . . . . . . . . . . . . . 10, 30
<del> . . . . . . . . . . . . . . 2
ABS . . . . . . . . . . . . . . . 8
AND . . . . . . . . . . . . . . . 8
APPEND . . . . . . . . . . . . . . 8
APPLY . . . . . . . . . . . . . . 16
ASCII . . . . . . . . . . . . . . 23
ASSOC . . . . . . . . . . . . . . 32
ATOM . . . . . . . . . . . . . . . 8
ATSOC . . . . . . . . . . . . . . 23
BASE . . . . . . . . . . . . . . . 30
BCP (binding context pointer) . . 17
BIGNUM . . . . . . . . . . . . . . 2
BIGP . . . . . . . . . . . . . . . 8, 22
Binary program space (BPS) . . . . 24
Binding context pointer (BCP) . . 17
BOOLE . . . . . . . . . . . . . . 19
BPEND . . . . . . . . . . . . . . 31
BPORG . . . . . . . . . . . . . . 31
BPS (binary program space) . . . . 24
CAR . . . . . . . . . . . . . . . 32
CDR . . . . . . . . . . . . . . . 32
CLOSE . . . . . . . . . . . . . . 12
Code-pointer . . . . . . . . . . . 4
CODEP . . . . . . . . . . . . . . 8, 39-40
COMPILE . . . . . . . . . . . . . 23
COMPRESS . . . . . . . . . . . . . 22
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 44
COND . . . . . . . . . . . . . . . 23
Cond-form . . . . . . . . . . . . 23
CONS . . . . . . . . . . . . . . . 8
CONSTANTP . . . . . . . . . . . . 8
CORE . . . . . . . . . . . . . . . 25
DE . . . . . . . . . . . . . . . . 8
DEFLIST . . . . . . . . . . . . . 8
DELETE . . . . . . . . . . . . . . 8
DELIMIT . . . . . . . . . . . . . 21
DEPOSIT . . . . . . . . . . . . . 20
DF . . . . . . . . . . . . . . . . 8
DIFFERENCE . . . . . . . . . . . . 8
DIGIT . . . . . . . . . . . . . . 8
DIVIDE . . . . . . . . . . . . . . 8
DM . . . . . . . . . . . . . . . . 8
EJECT . . . . . . . . . . . . . . 8
EMSG* . . . . . . . . . . . . . . 10, 28
EQ . . . . . . . . . . . . . . . . 8
EQN . . . . . . . . . . . . . . . 8
EQUAL . . . . . . . . . . . . . . 8
ERROR . . . . . . . . . . . . . . 9
Error handling . . . . . . . . . . 8
ERRORSET . . . . . . . . . . . . . 10
EVAL . . . . . . . . . . . . . . . 15
EXAMINE . . . . . . . . . . . . . 19
EXCISE . . . . . . . . . . . . . . 26
EXCORE . . . . . . . . . . . . . . 26
EXPAND . . . . . . . . . . . . . . 8
EXPLODE . . . . . . . . . . . . . 22
EXPLODEC . . . . . . . . . . . . . 22
EXPT . . . . . . . . . . . . . . . 8
Fap loader . . . . . . . . . . . . 18
File name list . . . . . . . . . . 11
FILEP . . . . . . . . . . . . . . 8, 13
FISLM . . . . . . . . . . . . . . 18
FIX . . . . . . . . . . . . . . . 8
FIXNUM . . . . . . . . . . . . . . 2
FIXP . . . . . . . . . . . . . . . 8
FLAG . . . . . . . . . . . . . . . 8
FLAGP . . . . . . . . . . . . . . 8
FLOAD . . . . . . . . . . . . . . 18
FLOAT . . . . . . . . . . . . . . 8
Floating . . . . . . . . . . . . . 4
FLOATP . . . . . . . . . . . . . . 8
FLUID . . . . . . . . . . . . . . 22
FLUIDP . . . . . . . . . . . . . . 8
FREEZE . . . . . . . . . . . . . . 23
FSUBR . . . . . . . . . . . . . . 40
Full word space . . . . . . . . . 24
FUNARG . . . . . . . . . . . . . . 17
FUNCELL . . . . . . . . . . . . . 6
FUNCTION . . . . . . . . . . . . . 8
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 45
Function cell . . . . . . . . . . 6
GCD . . . . . . . . . . . . . . . 22
GCTIME . . . . . . . . . . . . . . 27
GENSYM . . . . . . . . . . . . . . 8
GET . . . . . . . . . . . . . . . 8
GETD . . . . . . . . . . . . . . . 8
GETV . . . . . . . . . . . . . . . 8
GLOBAL . . . . . . . . . . . . . . 22
GLOBALP . . . . . . . . . . . . . 8
GO . . . . . . . . . . . . . . . . 32
GREATERP . . . . . . . . . . . . . 8
IBASE . . . . . . . . . . . . . . 30
Id . . . . . . . . . . . . . . . . 4
Identifier . . . . . . . . . . . . 4
IDP . . . . . . . . . . . . . . . 8
IGNORE . . . . . . . . . . . . . . 21
INC* . . . . . . . . . . . . . . . 12, 31
INITFN* . . . . . . . . . . . . . 30
Integer . . . . . . . . . . . . . 2
INTERN . . . . . . . . . . . . . . 8
INTERNP . . . . . . . . . . . . . 22
Interpreter . . . . . . . . . . . 15
INUM . . . . . . . . . . . . . . . 2
INUMP . . . . . . . . . . . . . . 8, 22
LABEL . . . . . . . . . . . . . . 17
LENGTH . . . . . . . . . . . . . . 8
LESSP . . . . . . . . . . . . . . 8
LETTER . . . . . . . . . . . . . . 21
LINELENGTH . . . . . . . . . . . . 14
LIST . . . . . . . . . . . . . . . 8
LITER . . . . . . . . . . . . . . 8
LPOSN . . . . . . . . . . . . . . 8
LSH . . . . . . . . . . . . . . . 19
MAP . . . . . . . . . . . . . . . 8
MAPC . . . . . . . . . . . . . . . 8
MAPCAN . . . . . . . . . . . . . . 8
MAPCAR . . . . . . . . . . . . . . 8
MAPCON . . . . . . . . . . . . . . 8
MAPLIST . . . . . . . . . . . . . 8
MAX . . . . . . . . . . . . . . . 8
MAX2 . . . . . . . . . . . . . . . 8
MEMBER . . . . . . . . . . . . . . 8
MEMQ . . . . . . . . . . . . . . . 8
MIN . . . . . . . . . . . . . . . 8
MIN2 . . . . . . . . . . . . . . . 8
MINUS . . . . . . . . . . . . . . 8
MKCODE . . . . . . . . . . . . . . 19
MKVECT . . . . . . . . . . . . . . 8
NCONC . . . . . . . . . . . . . . 32
NIL . . . . . . . . . . . . . . . 28
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 46
NOT . . . . . . . . . . . . . . . 8
NULL . . . . . . . . . . . . . . . 8
NUMBERP . . . . . . . . . . . . . 8
NUMVAL . . . . . . . . . . . . . . 18
OBLIST . . . . . . . . . . . . . . 31
OPEN . . . . . . . . . . . . . . . 11
OR . . . . . . . . . . . . . . . . 8
OUTC* . . . . . . . . . . . . . . 12, 31
PAGELENGTH . . . . . . . . . . . . 8, 14
PAIR . . . . . . . . . . . . . . . 8
PAIRP . . . . . . . . . . . . . . 8
PGLINE . . . . . . . . . . . . . . 13
PLUS . . . . . . . . . . . . . . . 8
PLUS2 . . . . . . . . . . . . . . 8
PNAME . . . . . . . . . . . . . . 5
POSN . . . . . . . . . . . . . . . 8
PRIN1 . . . . . . . . . . . . . . 8, 15
PRIN2 . . . . . . . . . . . . . . 8, 15
PRINT . . . . . . . . . . . . . . 8, 15
PROG . . . . . . . . . . . . . . . 8
PROGN . . . . . . . . . . . . . . 8
Property list . . . . . . . . . . 5
PUT . . . . . . . . . . . . . . . 8
PUTD . . . . . . . . . . . . . . . 23
PUTV . . . . . . . . . . . . . . . 8
QUOTE . . . . . . . . . . . . . . 8
QUOTIENT . . . . . . . . . . . . . 8
RDS . . . . . . . . . . . . . . . 12
RDSLSH . . . . . . . . . . . . . . 13
READ . . . . . . . . . . . . . . . 14-15, 21
READCH . . . . . . . . . . . . . . 15
RECLAIM . . . . . . . . . . . . . 27
REMAINDER . . . . . . . . . . . . 8
REMD . . . . . . . . . . . . . . . 8
REMFLAG . . . . . . . . . . . . . 8
REMOB . . . . . . . . . . . . . . 8
REMPROP . . . . . . . . . . . . . 8
RETURN . . . . . . . . . . . . . . 32
REVERSE . . . . . . . . . . . . . 8
RPLACA . . . . . . . . . . . . . . 32
RPLACD . . . . . . . . . . . . . . 32
SASSOC . . . . . . . . . . . . . . 8
SCAN . . . . . . . . . . . . . . . 21
SCANINIT . . . . . . . . . . . . . 21
SCANSET . . . . . . . . . . . . . 20
SCNVAL . . . . . . . . . . . . . . 31
SET . . . . . . . . . . . . . . . 22
SETPCHAR . . . . . . . . . . . . . 13
SETQ . . . . . . . . . . . . . . . 22
SETSYS . . . . . . . . . . . . . . 13
STANDARD LISP ON DECSYSTEM 10 AND 20 Page 47
SKIPTO . . . . . . . . . . . . . . 14
SPEAK . . . . . . . . . . . . . . 27
String . . . . . . . . . . . . . . 4
STRINGP . . . . . . . . . . . . . 8
SUBLIS . . . . . . . . . . . . . . 8
SUBR . . . . . . . . . . . . . . . 40
SUBST . . . . . . . . . . . . . . 8
SYS: . . . . . . . . . . . . . . . 13
SYSTEM* . . . . . . . . . . . . . 31
T . . . . . . . . . . . . . . . . 28
TERPRI . . . . . . . . . . . . . . 8
TIME . . . . . . . . . . . . . . . 11
TIMES . . . . . . . . . . . . . . 8
TIMES2 . . . . . . . . . . . . . . 8
TYI . . . . . . . . . . . . . . . 14-15
TYO . . . . . . . . . . . . . . . 14
UNBOUND . . . . . . . . . . . . . 16
UNFLUID . . . . . . . . . . . . . 22
UNREADCH . . . . . . . . . . . . . 14
UPBV . . . . . . . . . . . . . . . 8
VALUE . . . . . . . . . . . . . . 6
Value cell . . . . . . . . . . . . 6
Vector . . . . . . . . . . . . . . 4
VECTORP . . . . . . . . . . . . . 8
WARNING . . . . . . . . . . . . . 10
WRS . . . . . . . . . . . . . . . 12
↑A . . . . . . . . . . . . . . . . 2
↑C . . . . . . . . . . . . . . . . 2
↑G . . . . . . . . . . . . . . . . 2, 10
↑O . . . . . . . . . . . . . . . . 2
↑R . . . . . . . . . . . . . . . . 2
↑U . . . . . . . . . . . . . . . . 2
↑X . . . . . . . . . . . . . . . . 2
↑Z . . . . . . . . . . . . . . . . 15
↑← . . . . . . . . . . . . . . . . 15, 28